/*
 * 类目 信息统计
 */
import { getRequest, postRequest, getdownloadRequest, downloadRequest } from '/@/lib/axios';

export const getStatisticsApi = {
  /* 
    根据捐赠用途  
    */
  // 捐赠用途列表  /foundation/blapplyprojectinfo/getUse
  getUseList: () => {
    return getRequest(`/foundation/blapplyprojectinfo/getUse`);
  },
  // 导出  /foundation/blapplyprojectinfo/exportUse
  download: () => {
    return getdownloadRequest(`/foundation/blapplyprojectinfo/exportUse`);
  },
  // 项目列表  /foundation/blapplyprojectinfo/getListByUse
  getProList: (params) => {
    return postRequest(`/foundation/blapplyprojectinfo/getListByUse`, params);
  },
  // 删除
  foundationDelete: (categoryId) => {
    return postRequest(`/foundation/bllargedonation/delete`, categoryId);
  },

  downloadss: (blagreementid) => {
    return downloadRequest(`/foundation/blagreement/download?blagreementid=${blagreementid}`);
  },

  /*
   ****项目统计
   */
  //   /foundation/blapplyprojectinfo/getComplete   已完成项目信息
  getComplete: (params) => {
    return postRequest(`/foundation/blapplyprojectinfo/getComplete`, params);
  },
  // 导出二级项目  /foundation/blapplyprojectinfo/exportApplyProList
  exportApplyProList: () => {
    return getdownloadRequest(`/foundation/blapplyprojectinfo/exportApplyProList`);
  },

  /* 
    捐赠方信息统计
    */
  //    列表  /foundation/bldonor/getDonorList
  getDonorList: (param) => {
    return postRequest(`/foundation/bldonor/getDonorList`, param);
  },
  // 导出  /foundation/bldonor/exportDonorList

  exportDonorList: () => {
    return getdownloadRequest(`/foundation/bldonor/exportDonorList`);
  },
  /* 
    协议统计
    */
  //协议列表    /foundation/blagreement/getAllAgreement
  getAllAgreement: (params) => {
    return postRequest(`/foundation/blagreement/getAllAgreement`, params);
  },
  // 协议列表导出
  agreementExport: () => {
    return getdownloadRequest(`/foundation/blagreement/agreementExport`);
  },
  //根据年份统计 /foundation/blagreement/getList?year=2024

  getYearList: (param) => {
    return postRequest(`/foundation/blagreement/getAllAgreement`, param);
  },
  /* 
        一级项目清单
    */
  //一级项目列表   /foundation/blproject/getOnePro

  getOnePro: (params) => {
    return postRequest(`/foundation/blproject/getOnePro`, params);
  },
  // /foundation/blproject/exportProList  导出一级项目
  exportProList: () => {
    return getdownloadRequest(`/foundation/blproject/exportProList`);
  },
  // 二级项目导出  /foundation/blapplyprojectinfo/exportApplyProList
  exportProTwoList: () => {
    return getdownloadRequest(`/foundation/blapplyprojectinfo/exportApplyProList`);
  },
  // 年度预算导出  /foundation/blbudget/exportBudgetList
  exportBudgetList: () => {
    return getdownloadRequest(`/foundation/blbudget/exportBudgetList`);
  },
  // 资金使用申请 导出 /foundation/blapply/exportApplyList
  exportApplyList: () => {
    return getdownloadRequest(`/foundation/blapply/exportApplyList`);
  },
  /* 
     筹资项目
    */
  //    列表 /foundation/blfinancproject/getProjectList
  getProjectList: (params) => {
    return postRequest(`/foundation/blfinancproject/getProjectList`, params);
  },
  // 导出所有  /foundation/blfinancproject/exportFinancProject
  exportFinancProject: () => {
    return getdownloadRequest(`/foundation/blfinancproject/exportFinancProject`);
  },
};
